package day06_homework_4;

public class Rectangle {
	private int length ;
	private int width;
	
	protected int calculatePerimeter() {
		return (length+width)*2;
	}
	protected int calculateArea() {
		return length*width;
	}
	
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	//构造方法
	public Rectangle() {
		// TODO Auto-generated constructor stub
		this.setLength(1);
		this.setWidth(1);
	}
	public Rectangle(int all) {
		// TODO Auto-generated constructor stub
		this.setLength(all);
		this.setWidth(all);
	}
	public Rectangle(int length,int width) {
		// TODO Auto-generated constructor stub
		this.setLength(length);
		this.setWidth(width);
	}
	
}
